package com.threeti.mecool.core.domain.model.project;

import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.threeti.mecool.core.domain.model.basicdata.Brand;
import com.threeti.mecool.framework.domain.support.DefaultDomainEntity;

/**
 * 项目采集项
 **/
@Entity
@Table(name = "DM_PROJECT_PRODUCT")
public class ProjectProduct extends DefaultDomainEntity {

  @ManyToOne
  private Project project;
  
  private String skuCode;
  
  private String skuName;

  @Embedded
  private Brand brand;

  public ProjectProduct(Project project, String skuCode, String name, Brand brand) {
    super();
    this.project = project;
    this.skuCode = skuCode;
    this.skuName = name;
    this.brand = brand;
  }

  public Project getProject() {
    return project;
  }

  public String getSkuCode() {
    return skuCode;
  }

  public String getSkuName() {
    return skuName;
  }

  public Brand getBrand() {
    return brand;
  }

  @Override
  public String toString() {
    return "ProjectProduct [skuCode=" + skuCode + ", skuName=" + skuName + ", brand=" + brand + "]";
  }

  ProjectProduct() {
    super();
  }

  public void setProject(Project project) {
    this.project = project;
  }
  
}
